# ------------------------------窗口初始化-------------------------------------
def window_init(self,MainWindow):
        
    # 分辨率
    self.desktop = QApplication.desktop()
    self.screenRect = self.desktop.screenGeometry()
    self.screenheight = self.screenRect.height()
    self.screenwidth = self.screenRect.width()
    self.window = MainWindow
    MainWindow.setMinimumSize(200, 200)
    MainWindow.setMaximumSize(self.screenwidth, self.screenheight)
    # MainWindow.setWindowFlag(QtCore.Qt.FramelessWindowHint)  # 无边框
    MainWindow.setAutoFillBackground(True) #一定要加上
    # MainWindow.setAttribute(QtCore.Qt.WA_TranslucentBackground)  # 窗口透明
    MainWindow.resize(1920,1080)
    MainWindow.setStyleSheet("#MainWindow{border-image:url(src/mot_ui/mot_ui/submodules/ui/bk.png)}") # 设置背景图片
    # 全屏选项
    # MainWindow.showFullScreen()